from typing import Dict, Any, List
import os
from dotenv import load_dotenv

load_dotenv()


def get_model_client():

    model_client = OpenAIChatCompletionClient(
        # **llm_config
        llm_config=llm_config
    )
    return model_client

def get_llm_config() -> Dict[str, Any]:
    """
    Loads the LLM configuration from environment variables.
    """

    api_key = os.getenv("OPENAI_API_KEY")
    api_base = os.getenv("OPENAI_API_BASE")
    model_name = os.getenv("MODEL_NAME", "deepseek-chat")

    if not api_key or not api_base:
        raise ValueError("请在 .env 文件中设置 OPENAI_API_KEY 和 OPENAI_API_BASE。")

    return {
        # "config_list": [{
        # }],
        'model': model_name,
        'api_key': api_key,
        'base_url': api_base,
        "temperature": 0.3,  # A bit more creativity for planning and review
    }


